package com.lizhenhua.usercheck.controller;

import com.lizhenhua.fmmall.entity.Users;

import com.lizhenhua.usercheck.service.UserCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class CheckUserController {
    @Autowired
    private UserCheckService checkService;

    @GetMapping("/check")
    public Users checkUser(@RequestParam("username") String userName) {
        System.out.println(userName);
        Users users = checkService.queryUser(userName);
        return users;
    }


}
